package com.aliyun.messagemgt.converter;

import com.aliyun.messagemgt.dto.base.BaseReceiveGroupRangeAddCmd;
import com.aliyun.messagemgt.dto.base.BaseReceiveGroupRangeDTO;
import com.aliyun.messagemgt.entities.BaseReceiveGroupRange;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @ClassName: BaseReceiveGroupRangeConverter
 * @Description:
 * @Author: wugongzi
 * @Date: 2021/9/28 11:36
 * @Version: 1.0
 */
@Mapper
public interface BaseReceiveGroupRangeConverter {
    BaseReceiveGroupRangeConverter INSTANCE = Mappers.getMapper(BaseReceiveGroupRangeConverter.class);

    List<BaseReceiveGroupRangeDTO> baseReceiveGroupRangeList2baseReceiveGroupRangeDTOList(List<BaseReceiveGroupRange> baseReceiveGroupRangeList);

    List<BaseReceiveGroupRange> baseReceiveGroupRangeAddCmdList2baseReceiveGroupRangeList(List<BaseReceiveGroupRangeAddCmd> baseReceiveGroupRangeAddCmdList);

    @Mappings({
            @Mapping(source = "creator",target = "modifier")
    })
    BaseReceiveGroupRange baseReceiveGroupRangeAddCmd2baseReceiveGroupRange(BaseReceiveGroupRangeAddCmd baseReceiveGroupRangeAddCmd);
}
